package com.suyuan.service.impl;

import com.suyuan.dao.PurchaseInfoMapper;
import com.suyuan.entity.PurchaseInfo;
import com.suyuan.entity.PurchaseInfoExample;
import com.suyuan.service.PurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by yang on 2018/5/9.
 */
@Service(value = "purchaseService")
@Transactional
public class PurchaseServiceImpl implements PurchaseService {

    @Resource
    private PurchaseInfoMapper purchaseInfoMapper;

    public List<PurchaseInfo> findAll() {
        List<PurchaseInfo> infos = purchaseInfoMapper.selectByExample(new PurchaseInfoExample());
        return infos;
    }
}
